import req from '@/utils/request'

// 新增模板
export function addVisa(data) {
  return req.post('/api/human/contractSubjectElectronicVisa', data)
}

// 获取电子签列表
export function getList(data) {
  return req.post('/api/human/contractSubjectElectronicVisa/page', data)
}

// 获取电子签信息
export function getInfo(id) {
  return req.get(`/api/human/contractSubjectElectronicVisa/${id}`)
}

// 删除电子签
export function deleteList(data) {
  return req.delete('/api/human/contractSubjectElectronicVisa', { data })
}

// 获取已授权用户信息
export function getAuthObjectListByElectronicVisaId(data) {
  return req.get(
    '/api/human/contractSubjectElectronicVisa/getAuthObjectListByElectronicVisaId',
    data
  )
}

// 添加电子签授权用户
export function addAuthObject(data) {
  return req.post(
    '/api/human/contractSubjectElectronicVisa/addAuthObject',
    data
  )
}

// 删除电子签授权用户
export function delAuthObject(params) {
  return req.delete('/api/human/contractSubjectElectronicVisa/delAuthObject', {
    params
  })
}

// 提交审核
export function submitAudit(data) {
  return req.put('/api/human/contractSubjectElectronicVisa/submitAudit', data)
}

// 提交审核
export function editaudit(data) {
  return req.put('/api/human/contractSubjectElectronicVisa/audit', data)
}
